package architecture;

//_EX_MEM_Control_Buffer
public class _EX_MEM_Control_Buffer{
	MyInt memWrite_MEM;
	MyInt memRead_MEM;
	MyInt memToReg_MEM;
	MyInt regWrite_MEM;
	
	MyInt memWrite_EX;
	MyInt memRead_EX;
	MyInt memToReg_EX;
	MyInt regWrite_EX;
	void clockEvent(){
		MyUtil.transfer(memWrite_EX, memWrite_MEM);
		MyUtil.transfer(memRead_EX, memRead_MEM);
		MyUtil.transfer(memToReg_EX, memToReg_MEM);
		MyUtil.transfer(regWrite_EX, regWrite_MEM);
	}
	void dump(){
		System.out.println("--------");
		System.out.println("_EX_MEM_Control_Buffer:");
		System.out.println("memWrite_MEM:"+memWrite_MEM);
		System.out.println("memRead_MEM:"+memRead_MEM);
		System.out.println("memToReg_MEM:"+memToReg_MEM);
		System.out.println("regWrite_MEM:"+regWrite_MEM);
		
		System.out.println("memWrite_EX:"+memWrite_EX);
		System.out.println("memRead_EX:"+memRead_EX);
		System.out.println("memToReg_EX:"+memToReg_EX);
		System.out.println("regWrite_EX:"+regWrite_EX);
		System.out.println("--------");
	}
}